//
//  MyPin.m
//  GPS&Map
//
//  Created by  江志磊 on 15-3-3.
//  Copyright (c) 2015年 江 志磊. All rights reserved.
//

#import "MyPin.h"

@implementation MyPin
{
    NSString *_title;
    NSString *_subTitle;
    CLLocationCoordinate2D _lc2d;
}
- (id)initWithTitle:(NSString *)title subTitle:(NSString *)subTitle lc2d:(CLLocationCoordinate2D)lc2d{
    self = [super init];
    if (self) {
        //用三个成员变量，接收外界传递过来的三个值
        _title = [title copy];
        _subTitle = [subTitle copy];
        _lc2d = lc2d;
    }
    return self;
}
#pragma mark - MKAnnotation
//实现get方法
- (CLLocationCoordinate2D)coordinate{
    return _lc2d;
}
- (NSString *)title{
    return _title;
}
- (NSString *)subtitle{
    return _subTitle;
}


@end
